﻿using Loki.UI;

namespace Loki.Engine
{
    /// <summary>
    /// Common interface for templating engines.
    /// </summary>
    public interface ITemplatingEngine
    {
        /// <summary>
        /// Loads the templates definitions.
        /// </summary>
        /// <param name="P_TemplatesDefinitions">The templates definitions.</param>
        void LoadTemplates(params string[] P_TemplatesDefinitions);

        /// <summary>
        /// Gets the view template for the specified viewmodel.
        /// </summary>
        /// <typeparam name="TView">The type of the view.</typeparam>
        /// <param name="P_ViewModel">The view model.</param>
        TView GetView<TView>(IViewModel P_ViewModel) where TView : IView;

        /// <summary>
        /// Gets the view.
        /// </summary>
        /// <typeparam name="TView">The type of the view.</typeparam>
        /// <param name="P_ViewModel">The view model.</param>
        /// <param name="P_ModelID">The p_ model ID.</param>
        TView GetView<TView>(IViewModel P_ViewModel, string P_ModelID) where TView : IView;
    }
}
